<% @title = t('.title') %>
<% @roles = Ownership.roles.map { |k,_| [Ownership.human_attribute_name("role.#{k}"), k] } %>

<%= form_tag rubygem_owner_path(rubygem_id: @rubygem.slug, owner_id: @ownership.user.display_id), method: :patch do |form| %>
  <%= error_messages_for(@ownership) %>

  <div class="text_field">
    <%= label_tag :display_id, "User", class: 'form__label' %>
    <%= text_field_tag :display_id, @ownership.user.display_id, disabled: true, :class => 'form__input' %>
  </div>

  <div class="text_field">
    <%= label_tag :role, t(".role"), class: 'form__label' %>
    <br>
    <%= select_tag :role, options_for_select(@roles, @ownership.role), class: "form__input form__select"  %>
  </div>

  <div class="submit_field">
    <%= submit_tag 'Update', :data => {:disable_with => t('form_disable_with')}, :class => 'form__submit' %>
  </div>
<% end %>
